package com.atguigu.yygh.order.service;

import com.atguigu.yygh.model.order.OrderInfo;
import com.atguigu.yygh.model.order.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author:ahang
 * @create:2022-09-15 23:46
 * @Description:
 */
public interface PaymentService extends IService<PaymentInfo> {
    //保存交易记录
    void savePaymentInfo(OrderInfo orderInfo, Integer paymentType);

    /**
     * 支付成功之后调用该方法修改平台数据
     * @param outTradeNo orderInfo.outTradeNo
     * @param paramMap 查询订单状态方法的返回值
     */
    void paySuccess(String outTradeNo , Map<String,String> paramMap);

    /**
     * 获取支付记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId,Integer paymentType);
}
